package com.uprr.app.tnm.task {
    import mx.controls.Label;
    import mx.controls.listClasses.*;
	import com.uprr.app.tnm.model.Model;
	import mx.controls.*;

/**
 *  For highlight the curen train location
 */
 public class ColorLabel extends Label {
 
        private const POSITIVE_COLOR:uint = 0x000000; // Black
        private const NEGATIVE_COLOR:uint = 0xFF0000; // Red
 
        override protected function updateDisplayList(unscaledWidth:Number, unscaledHeight:Number):void {
            super.updateDisplayList(unscaledWidth, unscaledHeight);
 
            /* Set the font color based on the item price. */
			//Alert.show(data.rptgCrc7+","+Model.getInstance().curCirc7);
            setStyle("color", (data.rptgCrc7==Model.getInstance().curCirc7) ? NEGATIVE_COLOR : POSITIVE_COLOR);
			//setStyle("color", NEGATIVE_COLOR);
			//setText(data.rptgCrc7);
			}
    }
}